//类适配器模式
package Adapt;
//目标接口target
interface Target{
    public void request();
}
//适配者类
class Adaptee{
    public void specificRequest(){
        System.out.println("适配者业务被调用！");
    }
}
class ClassAdapter extends Adaptee implements Target{

    @Override
    public void request() {
        specificRequest();
    }
}
public class ClassAdapterTest {
    public static void main(String[] args) {
        //测试
        System.out.println("类适配器模式：");
        Target target = new ClassAdapter();
        target.request();
    }
}
